home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 43 / Amiga Format CD43 (1999)(Future Publishing)(GB)(Track 1 of 2)[!][issue 1999-09].iso / -serious- / programming / c / pmm / doku / thirdpartytools / protoman.doc < prev    next >
Text File  |  1999-06-14  |  5KB  |  143 lines

  1. ****** protoman.doc/protoman ******************************************
  2.  
  3.    NAME
  4.  
  5.     ProtoMan - Generate prototypes from and for C source. (V37)
  6.  
  7.    SYNOPSIS
  8.  
  9.     protoman FilePats/A/M,O=Outfile/K,AP=Append/S,DB=Database/K,
  10.              Lines/S,Static/S,BufSize/K/N
  11.  
  12.    FUNCTION
  13.  
  14.     Protoman was designed to scan C source files and produce
  15.     prototypes.  It will also keep track of multiple prototype
  16.     files in a main database for use with mutliple source file
  17.     projects.
  18.  
  19.    INPUTS
  20.  
  21.     FilePats/A/M - Any positive number of files or file paterns.
  22.     Outfile/K    - A file to output the prototypes to, if not
  23.                    supplied they will goto stdout.
  24.                    NOTE: this option will override the database
  25.                          option
  26.     Append       - Append to the file specified in Outfile. If this
  27.                    is not present the outfile will be truncated.
  28.     Database     - Use a database for storing prototypes.  This will
  29.                    store all prototypes in a database they will be
  30.                    stored in C parsable format.  See NOTES for more
  31.                    details.
  32.     Lines        - Generate line comments for each prototype. eg:
  33.                    /*    34 */ int main (int argc, char **argv);
  34.                    /*    72 */ int cleanup ( struct Globals *globals );
  35.     Static       - include statically declared functions in prototype
  36.                    file.  This doesn't seem all that useful but I am
  37.                    sure somebody needs it.
  38.     BufSize      - The number of bytes used for I/O buffers when reading
  39.                    and writing files.  The default is 2048, which seems
  40.                    to be the fastest.
  41.    RESULT
  42.  
  43.     The program will return 0 on success, or in most cases (all except
  44.     user break) 20 for failure.  It should give some decent indication
  45.     of what went wrong if something does.
  46.  
  47.    EXAMPLE
  48.  
  49.     protoman O=protos.h file1.c file2.c
  50.     protoman database=protos.h c/#?.c newc/#?.c lines
  51.  
  52.     or for a makefile maybe:
  53.  
  54.     srcs=file1.c file2.c file3.c [...] file49.c file50.c
  55.  
  56.     protos.h: $(srcs)
  57.         protoman database=$@ $?
  58.  
  59.     (in smake $? stands for all out of date dependent files.)
  60.  
  61.    NOTES
  62.  
  63.     The main reason for using this program instead of, for example, what
  64.     SAS/C supplies is the database capability.
  65.  
  66.     The database is a single file that Protoman keeps track of all
  67.     prototypes for all the files that have ever been passed to it.  If
  68.     a new file is passed to protoman it is added.  If a file is given
  69.     that is already present it is replaced.
  70.  
  71.     The need for a delete is probably there but not very intense.  The
  72.     main use for this is in projects and will probably be in a makefile.  
  73.     So a quick option would be in your clean: ie.
  74.  
  75.     clean:
  76.         delete protos.h
  77.  
  78.     The file will be regenerated from scratch then.
  79.  
  80.     Protoman seems to be reasonably fast on my 68030 system, a project
  81.     containing 39 C files totaling  324k is processed in about 17 seconds
  82.     for a full update. For a single file to be processed with this same
  83.     database it takes app. 5 seconds. (the database is 20k)
  84.  
  85.    HISTORY
  86.  
  87.     V37.3 - (14feb93) Second Release.
  88.             Fixed parser bug, was not handling comments that occured
  89.             the next character after a brace ('}'),  also fixed
  90.             same bug for C++ comments.  Made some local states global
  91.             for the better handling of multiple files.  Now a single
  92.             file having parse errors should not effect others being
  93.             parsed.            
  94.  
  95.     V37.2 - (12feb93) First Release.
  96.         Fixed most obvious bugs.
  97.  
  98.     V37.1 - (10feb93) Created.
  99.             Converted  my getprotos source into handling a data base.
  100.             Added ReadArgs support and tweaked speed, fixed bug in
  101.             source with the handling of function pointer's as
  102.             a function argument.
  103.  
  104.    BUGS
  105.  
  106.     None known.
  107.  
  108.    DISCLAIMER
  109.  
  110.     This programs main purpose is to handle c source a very valuable thing
  111.     and while it does NO writing to any source files, all errors cannot
  112.     be anticipated.  Therefore, I claim no responsibility for the destruction,
  113.     instruction or any othertion of anything this program may cause as a
  114.     result of, but not limited to, its use.
  115.  
  116.    COPYRIGHT
  117.  
  118.     This program protoman and its documentation are:
  119.  
  120.     Copyright © 1993 Christian E. Hopps.  All Rights Reserved.
  121.  
  122.     Distribution rights of this version (37.3) are granted to the
  123.     following people, services, and groups (ie. User groups):
  124.  
  125.     - Fred Fish for the Fred Fish disk collection.
  126.     - The Internet as a whole.
  127.     - Bix.
  128.     - Compuserve.
  129.     - Genie.
  130.     - and any person or group not earning a profit from
  131.       its distribution.
  132.  
  133.     The right to distribute is only granted to the package as a whole,
  134.     this includes the binary and documentation file.
  135.  
  136.     Freeware is a nice concept so don't abuse it.
  137.  
  138.    SEE ALSO
  139.     Me:     Chirstian E. Hopps
  140.     bix:    chopps@bix.com
  141.     home:   chopps@ro-chp.UUCP (sycom.mi.org!ro-chp!chopps)
  142.     school: chopps@emunix.emich.edu (may only be valid through 6/93)
  143.